/*
 * CDPSMetaGem.java
 * 
 * Copyright (c) 2009 Giles Millward (Manigra). All rights reserved.
 * 
 * This file is part of Expression program is undefined on line 8, column 40 in Templates/Licenses/license-gplv3.txt..
 * 
 * Expression program is undefined on line 10, column 19 in Templates/Licenses/license-gplv3.txt. is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Expression program is undefined on line 15, column 19 in Templates/Licenses/license-gplv3.txt. is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Expression program is undefined on line 21, column 30 in Templates/Licenses/license-gplv3.txt..  If not, see <http://www.gnu.org/licenses/>.
 */

package dpsinterface;

import paperdoll.CDollSlotType.DollSlotType;
import paperdoll.CPaperDoll;

/**
 *
 * @author Mani
 */
public class CDPSMetaGem {


    public enum MetaGemType { CHAOTIC_SKYFLARE_DIAMOND,
                                RELENTLESS_EARTHSIEGE_DIAMOND,
                                RELENTLESS_EARTHSTORM_DIAMOND,
                                THUNDERING_SKYFLARE_DIAMOND, // Melee/Ranged Haste Rating increased by 480 for 6 seconds
                                DONT_CARE};

    private boolean m_metaGemBroken;
    private MetaGemType m_metaGemType = MetaGemType.DONT_CARE;
    private double m_metaGemCritBoost = 0.00;
    private boolean m_metaGemHasteBoost = false;

    CDPSMetaGem(CPaperDoll p_paperDoll)
    {
        m_metaGemBroken = p_paperDoll.isMetaGemBroken();
        if (!m_metaGemBroken)
        {
            int l_metaGemId = p_paperDoll.getSlot(DollSlotType.HEAD).getMetaGem();
            if (l_metaGemId == 41285)
            {
                m_metaGemType = MetaGemType.CHAOTIC_SKYFLARE_DIAMOND;
                m_metaGemCritBoost = 0.03;
            } else if (l_metaGemId == 41398)
            {
                m_metaGemType = MetaGemType.RELENTLESS_EARTHSIEGE_DIAMOND;
                m_metaGemCritBoost = 0.03;
            } else if (l_metaGemId == 32409)
            {
                m_metaGemType = MetaGemType.RELENTLESS_EARTHSTORM_DIAMOND;
                m_metaGemCritBoost = 0.03;
            } else if (l_metaGemId == 41400)
            {
                m_metaGemType = MetaGemType.THUNDERING_SKYFLARE_DIAMOND;
                m_metaGemHasteBoost = true;
            }
        }
    }

    /**
     * @return the m_metaGemBroken
     */
    public boolean isMetaGemBroken() {
        return m_metaGemBroken;
    }

    /**
     * @return the m_metaGemType
     */
    public MetaGemType getMetaGemType() {
        return m_metaGemType;
    }

    /**
     * @return the m_metaGemCritBoost
     */
    public double getMetaGemCritBoost() {
        return m_metaGemCritBoost;
    }

    /**
     * @return the m_metaGemHasteBoost
     */
    public boolean isMetaGemHasteBoost() {
        return m_metaGemHasteBoost;
    }
}
